﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a deformable surface model.</summary>
	// Token: 0x0200002F RID: 47
	[Serializable]
	public class HDeformableSurfaceModel : HHandle, ISerializable, ICloneable
	{
		// Token: 0x06000433 RID: 1075 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDeformableSurfaceModel() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x06000434 RID: 1076 RVA: 0x00019AA5 File Offset: 0x00017CA5
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDeformableSurfaceModel(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x06000435 RID: 1077 RVA: 0x00019AB4 File Offset: 0x00017CB4
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDeformableSurfaceModel(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x06000436 RID: 1078 RVA: 0x00019AC3 File Offset: 0x00017CC3
		private void AssertSemType()
		{
			base.AssertSemType("deformable_surface_model");
		}

		// Token: 0x06000437 RID: 1079 RVA: 0x00019AD0 File Offset: 0x00017CD0
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDeformableSurfaceModel obj)
		{
			obj = new HDeformableSurfaceModel(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x06000438 RID: 1080 RVA: 0x00019AE8 File Offset: 0x00017CE8
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDeformableSurfaceModel[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HDeformableSurfaceModel[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HDeformableSurfaceModel(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Read a deformable surface model from a file.
		///   Modified instance represents: Handle of the read deformable surface model.
		/// </summary>
		/// <param name="fileName">Name of the file to read.</param>
		// Token: 0x06000439 RID: 1081 RVA: 0x00019B58 File Offset: 0x00017D58
		public HDeformableSurfaceModel(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1024);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create the data structure needed to perform deformable surface-based matching.
		///   Modified instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="relSamplingDistance">Sampling distance relative to the object's diameter Default: 0.05</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		// Token: 0x0600043A RID: 1082 RVA: 0x00019BA4 File Offset: 0x00017DA4
		public HDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1031);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.StoreD(proc, 1, relSamplingDistance);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Create the data structure needed to perform deformable surface-based matching.
		///   Modified instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="relSamplingDistance">Sampling distance relative to the object's diameter Default: 0.05</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		// Token: 0x0600043B RID: 1083 RVA: 0x00019C1C File Offset: 0x00017E1C
		public HDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, string genParamName, string genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1031);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.StoreD(proc, 1, relSamplingDistance);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreS(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		// Token: 0x0600043C RID: 1084 RVA: 0x00019C88 File Offset: 0x00017E88
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeDeformableSurfaceModel();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x0600043D RID: 1085 RVA: 0x00019CC0 File Offset: 0x00017EC0
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDeformableSurfaceModel(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeDeformableSurfaceModel(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x0600043E RID: 1086 RVA: 0x00019D00 File Offset: 0x00017F00
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeDeformableSurfaceModel();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x0600043F RID: 1087 RVA: 0x00019D14 File Offset: 0x00017F14
		public new static HDeformableSurfaceModel Deserialize(Stream stream)
		{
			HDeformableSurfaceModel hdeformableSurfaceModel = new HDeformableSurfaceModel();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hdeformableSurfaceModel.DeserializeDeformableSurfaceModel(hserializedItem);
			hserializedItem.Dispose();
			return hdeformableSurfaceModel;
		}

		// Token: 0x06000440 RID: 1088 RVA: 0x00019D3A File Offset: 0x00017F3A
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x06000441 RID: 1089 RVA: 0x00019D44 File Offset: 0x00017F44
		public new HDeformableSurfaceModel Clone()
		{
			HSerializedItem hserializedItem = this.SerializeDeformableSurfaceModel();
			HDeformableSurfaceModel hdeformableSurfaceModel = new HDeformableSurfaceModel();
			hdeformableSurfaceModel.DeserializeDeformableSurfaceModel(hserializedItem);
			hserializedItem.Dispose();
			return hdeformableSurfaceModel;
		}

		/// <summary>Free the memory of a deformable surface model.</summary>
		/// <param name="deformableSurfaceModel">Handle of the deformable surface model.</param>
		// Token: 0x06000442 RID: 1090 RVA: 0x00019D6C File Offset: 0x00017F6C
		public static void ClearDeformableSurfaceModel(HDeformableSurfaceModel[] deformableSurfaceModel)
		{
			HTuple htuple = HHandleBase.ConcatArray(deformableSurfaceModel);
			IntPtr proc = HalconAPI.PreCall(1021);
			HalconAPI.Store(proc, 0, htuple);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(deformableSurfaceModel);
		}

		/// <summary>
		///   Free the memory of a deformable surface model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		// Token: 0x06000443 RID: 1091 RVA: 0x00019DB0 File Offset: 0x00017FB0
		public void ClearDeformableSurfaceModel()
		{
			IntPtr proc = HalconAPI.PreCall(1021);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Deserialize a deformable surface model.
		///   Modified instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x06000444 RID: 1092 RVA: 0x00019DE4 File Offset: 0x00017FE4
		public void DeserializeDeformableSurfaceModel(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1022);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize a deformable surface_model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x06000445 RID: 1093 RVA: 0x00019E38 File Offset: 0x00018038
		public HSerializedItem SerializeDeformableSurfaceModel()
		{
			IntPtr proc = HalconAPI.PreCall(1023);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read a deformable surface model from a file.
		///   Modified instance represents: Handle of the read deformable surface model.
		/// </summary>
		/// <param name="fileName">Name of the file to read.</param>
		// Token: 0x06000446 RID: 1094 RVA: 0x00019E80 File Offset: 0x00018080
		public void ReadDeformableSurfaceModel(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1024);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Write a deformable surface model to a file.
		///   Instance represents: Handle of the deformable surface model to write.
		/// </summary>
		/// <param name="fileName">File name to write to.</param>
		// Token: 0x06000447 RID: 1095 RVA: 0x00019ECC File Offset: 0x000180CC
		public void WriteDeformableSurfaceModel(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1025);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Refine the position and deformation of a deformable surface model in a 3D scene.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model containing the scene.</param>
		/// <param name="relSamplingDistance">Relative sampling distance of the scene. Default: 0.05</param>
		/// <param name="initialDeformationObjectModel3D">Initial deformation of the 3D object model</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		/// <param name="deformableSurfaceMatchingResult">Handle of the matching result.</param>
		/// <returns>Score of the refined model.</returns>
		// Token: 0x06000448 RID: 1096 RVA: 0x00019F08 File Offset: 0x00018108
		public HTuple RefineDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HObjectModel3D initialDeformationObjectModel3D, HTuple genParamName, HTuple genParamValue, out HDeformableSurfaceMatchingResult[] deformableSurfaceMatchingResult)
		{
			IntPtr proc = HalconAPI.PreCall(1026);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, objectModel3D);
			HalconAPI.StoreD(proc, 2, relSamplingDistance);
			HalconAPI.Store(proc, 3, initialDeformationObjectModel3D);
			HalconAPI.Store(proc, 4, genParamName);
			HalconAPI.Store(proc, 5, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			num = HDeformableSurfaceMatchingResult.LoadNew(proc, 1, num, out deformableSurfaceMatchingResult);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
			GC.KeepAlive(initialDeformationObjectModel3D);
			return result;
		}

		/// <summary>
		///   Refine the position and deformation of a deformable surface model in a 3D scene.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model containing the scene.</param>
		/// <param name="relSamplingDistance">Relative sampling distance of the scene. Default: 0.05</param>
		/// <param name="initialDeformationObjectModel3D">Initial deformation of the 3D object model</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		/// <param name="deformableSurfaceMatchingResult">Handle of the matching result.</param>
		/// <returns>Score of the refined model.</returns>
		// Token: 0x06000449 RID: 1097 RVA: 0x00019FA8 File Offset: 0x000181A8
		public double RefineDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HObjectModel3D initialDeformationObjectModel3D, string genParamName, string genParamValue, out HDeformableSurfaceMatchingResult deformableSurfaceMatchingResult)
		{
			IntPtr proc = HalconAPI.PreCall(1026);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, objectModel3D);
			HalconAPI.StoreD(proc, 2, relSamplingDistance);
			HalconAPI.Store(proc, 3, initialDeformationObjectModel3D);
			HalconAPI.StoreS(proc, 4, genParamName);
			HalconAPI.StoreS(proc, 5, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			double result;
			num = HalconAPI.LoadD(proc, 0, num, out result);
			num = HDeformableSurfaceMatchingResult.LoadNew(proc, 1, num, out deformableSurfaceMatchingResult);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
			GC.KeepAlive(initialDeformationObjectModel3D);
			return result;
		}

		/// <summary>
		///   Find the best match of a deformable surface model in a 3D scene.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model containing the scene.</param>
		/// <param name="relSamplingDistance">Scene sampling distance relative to the diameter of the surface model. Default: 0.05</param>
		/// <param name="minScore">Minimum score of the returned match. Default: 0</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		/// <param name="deformableSurfaceMatchingResult">Handle of the matching result.</param>
		/// <returns>Score of the found instances of the surface model.</returns>
		// Token: 0x0600044A RID: 1098 RVA: 0x0001A03C File Offset: 0x0001823C
		public HTuple FindDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HTuple minScore, HTuple genParamName, HTuple genParamValue, out HDeformableSurfaceMatchingResult[] deformableSurfaceMatchingResult)
		{
			IntPtr proc = HalconAPI.PreCall(1027);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, objectModel3D);
			HalconAPI.StoreD(proc, 2, relSamplingDistance);
			HalconAPI.Store(proc, 3, minScore);
			HalconAPI.Store(proc, 4, genParamName);
			HalconAPI.Store(proc, 5, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(minScore);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			num = HDeformableSurfaceMatchingResult.LoadNew(proc, 1, num, out deformableSurfaceMatchingResult);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
			return result;
		}

		/// <summary>
		///   Find the best match of a deformable surface model in a 3D scene.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model containing the scene.</param>
		/// <param name="relSamplingDistance">Scene sampling distance relative to the diameter of the surface model. Default: 0.05</param>
		/// <param name="minScore">Minimum score of the returned match. Default: 0</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		/// <param name="deformableSurfaceMatchingResult">Handle of the matching result.</param>
		/// <returns>Score of the found instances of the surface model.</returns>
		// Token: 0x0600044B RID: 1099 RVA: 0x0001A0DC File Offset: 0x000182DC
		public double FindDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, double minScore, HTuple genParamName, HTuple genParamValue, out HDeformableSurfaceMatchingResult deformableSurfaceMatchingResult)
		{
			IntPtr proc = HalconAPI.PreCall(1027);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, objectModel3D);
			HalconAPI.StoreD(proc, 2, relSamplingDistance);
			HalconAPI.StoreD(proc, 3, minScore);
			HalconAPI.Store(proc, 4, genParamName);
			HalconAPI.Store(proc, 5, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			double result;
			num = HalconAPI.LoadD(proc, 0, num, out result);
			num = HDeformableSurfaceMatchingResult.LoadNew(proc, 1, num, out deformableSurfaceMatchingResult);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
			return result;
		}

		/// <summary>
		///   Return the parameters and properties of a deformable surface model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="genParamName">Name of the parameter. Default: "sampled_model"</param>
		/// <returns>Value of the parameter.</returns>
		// Token: 0x0600044C RID: 1100 RVA: 0x0001A178 File Offset: 0x00018378
		public HTuple GetDeformableSurfaceModelParam(HTuple genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1028);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the parameters and properties of a deformable surface model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="genParamName">Name of the parameter. Default: "sampled_model"</param>
		/// <returns>Value of the parameter.</returns>
		// Token: 0x0600044D RID: 1101 RVA: 0x0001A1D0 File Offset: 0x000183D0
		public HTuple GetDeformableSurfaceModelParam(string genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1028);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Add a reference point to a deformable surface model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="referencePointX">x-coordinates of a reference point.</param>
		/// <param name="referencePointY">x-coordinates of a reference point.</param>
		/// <param name="referencePointZ">x-coordinates of a reference point.</param>
		/// <returns>Index of the new reference point.</returns>
		// Token: 0x0600044E RID: 1102 RVA: 0x0001A220 File Offset: 0x00018420
		public HTuple AddDeformableSurfaceModelReferencePoint(HTuple referencePointX, HTuple referencePointY, HTuple referencePointZ)
		{
			IntPtr proc = HalconAPI.PreCall(1029);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, referencePointX);
			HalconAPI.Store(proc, 2, referencePointY);
			HalconAPI.Store(proc, 3, referencePointZ);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(referencePointX);
			HalconAPI.UnpinTuple(referencePointY);
			HalconAPI.UnpinTuple(referencePointZ);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.INTEGER, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Add a reference point to a deformable surface model.
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="referencePointX">x-coordinates of a reference point.</param>
		/// <param name="referencePointY">x-coordinates of a reference point.</param>
		/// <param name="referencePointZ">x-coordinates of a reference point.</param>
		/// <returns>Index of the new reference point.</returns>
		// Token: 0x0600044F RID: 1103 RVA: 0x0001A294 File Offset: 0x00018494
		public int AddDeformableSurfaceModelReferencePoint(double referencePointX, double referencePointY, double referencePointZ)
		{
			IntPtr proc = HalconAPI.PreCall(1029);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, referencePointX);
			HalconAPI.StoreD(proc, 2, referencePointY);
			HalconAPI.StoreD(proc, 3, referencePointZ);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			int result;
			num = HalconAPI.LoadI(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Add a sample deformation to a deformable surface model
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the deformed 3D object model.</param>
		// Token: 0x06000450 RID: 1104 RVA: 0x0001A2F4 File Offset: 0x000184F4
		public void AddDeformableSurfaceModelSample(HObjectModel3D[] objectModel3D)
		{
			HTuple htuple = HHandleBase.ConcatArray(objectModel3D);
			IntPtr proc = HalconAPI.PreCall(1030);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, htuple);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Add a sample deformation to a deformable surface model
		///   Instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the deformed 3D object model.</param>
		// Token: 0x06000451 RID: 1105 RVA: 0x0001A348 File Offset: 0x00018548
		public void AddDeformableSurfaceModelSample(HObjectModel3D objectModel3D)
		{
			IntPtr proc = HalconAPI.PreCall(1030);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, objectModel3D);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Create the data structure needed to perform deformable surface-based matching.
		///   Modified instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="relSamplingDistance">Sampling distance relative to the object's diameter Default: 0.05</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		// Token: 0x06000452 RID: 1106 RVA: 0x0001A38C File Offset: 0x0001858C
		public void CreateDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, HTuple genParamName, HTuple genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1031);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.StoreD(proc, 1, relSamplingDistance);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Create the data structure needed to perform deformable surface-based matching.
		///   Modified instance represents: Handle of the deformable surface model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="relSamplingDistance">Sampling distance relative to the object's diameter Default: 0.05</param>
		/// <param name="genParamName">Names of the generic parameters. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters. Default: []</param>
		// Token: 0x06000453 RID: 1107 RVA: 0x0001A404 File Offset: 0x00018604
		public void CreateDeformableSurfaceModel(HObjectModel3D objectModel3D, double relSamplingDistance, string genParamName, string genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1031);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.StoreD(proc, 1, relSamplingDistance);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreS(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}
	}
}
